-- GENERATED SPELL FOR [Avalanchion] --


function spell0_14464(pUnit, Event) --@Boulder,n/a--
pUnit:FullCastSpellOnTarget(23392,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14464', 2000, 1)
end

function spell1_14464(pUnit, Event) --@Ground Tremor,Self--
pUnit:FullCastSpellOnTarget(6524,pUnit)
pUnit:RegisterEvent('Sorts_14464', 2000, 1)
end

function spell2_14464(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(5568,pUnit)
pUnit:RegisterEvent('Sorts_14464', 667, 1)
end

function Sorts_14464(pUnit, Event)
local choix_sorts_14464 = math.random(0, 2)
if choix_sorts_14464 == 0 then
pUnit:RegisterEvent('spell0_14464', 1, 1)
end
if choix_sorts_14464 == 1 then
pUnit:RegisterEvent('spell1_14464', 1, 1)
end
if choix_sorts_14464 == 2 then
pUnit:RegisterEvent('spell2_14464', 1, 1)
end
end

function mob14464_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14464', math.random(1500, 3000), 1)
end

function mob14464_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14464_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14464_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14464, 1, 'mob14464_Action')
RegisterUnitEvent(14464, 2, 'mob14464_Leave')
RegisterUnitEvent(14464, 3, 'mob14464_Kill')
RegisterUnitEvent(14464, 4, 'mob14464_Die')
